import {reqRecommed} from '@/api'
export default {
    state: {
        detailInfo:{}
    },
    mutations: {
        GETRECOMMED(state,detailInfo){
            state.detailInfo = detailInfo
        }
    },
    actions: {
        async getRecommed({state,commit,dispatch}){
            let result = await reqRecommed();
            // console.log(result)
            if(result.code == 200){
                commit('GETRECOMMED',result.data.data)
            }
        }

    },
    getters: {
        detailInfo(state){
            return state.detailInfo
        },
        kingkongList(state){
            return state.detailInfo.kingKongModule?state.detailInfo.kingKongModule.kingKongList||[]:{}
        },
        tagList(state){
            return state.detailInfo.tagList || []
        },
        policyDescList(state){
            return state.detailInfo.policyDescList || []
        },
        indexActivityModule(state){
            return state.detailInfo.indexActivityModule || []
        },
        categoryHotSellModule(state){
            return state.detailInfo.categoryHotSellModule || {}
        },
        sceneLightShoppingGuideModule(state){
            return state.detailInfo.sceneLightShoppingGuideModule || []
        }
       
    }
}